1. Field of the Invention
The present invention relates to signal processing apparatuses and methods, recording media, and programs, and more particularly, to a signal processing apparatus and method, a recording medium, and a program, for example, suitable for maintaining a steep edge of pixels constituting an image and, at the same time, smoothing a non-edge portion that does not include the edge.
2. Description of the Related Art
In order to increase the contrast, that is, the brightness contrast, and the definition, that is, the clarity of outline, of images captured by image capturing devices, such as charge-coupled devices (CCDs) or complementary metal-oxide semiconductors (CMOSs), in video cameras, contrast enhancement methods by gray scale conversion and high-frequency component enhancement methods for enhancing the contrast of high-frequency components in images have been available.
Contrast enhancement methods called tone curve adjustment for converting the levels of pixels of an image using functions having predetermined input-output relationships (hereinafter, referred to as level conversion functions) and histogram equalization for accommodatively converting the level conversion functions in accordance with frequency distribution of the pixel levels have been suggested.
A high-frequency component enhancement method called unsharp masking for extracting an edge in an image and enhancing the extracted edge, that is, so-called outline enhancement, has been suggested.
In contrast enhancement methods, however, the contrast of only a part of a brightness area of the whole dynamic range (a difference between the maximum level and the minimum level) of an image can be increased. Moreover, in the tone curve adjustment, the contrast is reduced in the brightest part and the darkest part of an image and, in the histogram equalization, the contrast is reduced in a brightness area with less frequency distribution. Furthermore, in the high-frequency component enhancement method, since only the contrast of high-frequency components of an image is enhanced and an area near an edge in the image is thus unnaturally enhanced, the quality of the image is inevitably reduced.
A method for maintaining a steep edge in which a pixel value changes steeply and, at the same time, for amplifying a non-edge portion that does not include the edge in input image data so as to enhance the non-edge portion by an image signal processing apparatus arranged, as shown in FIG. 1, is disclosed, for example, in Japanese Unexamined Patent Application Publication No. 2001-298621.
In the image signal processing apparatus shown in FIG. 1, an input image signal composed of pixels (pixel values) is input to an ε-filter 1 and a subtracter 2. If, for example, an image signal that slightly fluctuates before and after a steep edge whose size is larger than a predetermined threshold ε1, as shown in FIG. 2A, is input to the ε-filter 1, the image signal is converted into an image signal in which only the edge is extracted, as shown in FIG. 2B. Then, the converted image signal is output to the subtracter 2 and an adder 4.
Specific processing performed by the ε-filter 1 will now be described with reference to FIGS. 3 and 4. The ε-filter 1 sequentially designates each pixel of an input image as a target pixel C. As shown in FIG. 3, the ε-filter 1 sets taps including a plurality of neighboring pixels (in this case, pixels L2, L1, R1, and R2) arranged consecutively in the horizontal direction around the target pixel C, and a weighted average of the pixel values of the target pixel C and the plurality of neighboring pixels is obtained using tap coefficients (for example {1, 2, 3, 2, 1}), as shown by Equation (1), to be output as a converted result C′ corresponding to the target pixel C.C′=(1·L2+2·L1+3·C+2·R1+1·R2)/9  (1)
However, if a difference between the target pixel C and a neighboring pixel is larger than the predetermined threshold ε1 (in FIG. 4, a difference between the target pixel C and the neighboring pixel R2 is larger than the threshold ε1), calculation is performed using the pixel value of the target pixel C, instead of the pixel value of the neighboring pixel. In other words, in the case shown in FIG. 4, a calculation shown by Equation (2) is performed.C′=(1·L2+2·L1+3·C+2·R1+1·C)/9  (2)
Referring back to FIG. 1, the subtracter 2 subtracts the image signal input from the εfilter 1 from the image signal input from the previous stage (this signal is equal to the signal that is input to the ε-filter 1), so that an image signal that does not include an edge and that slightly fluctuates is extracted. Then, the subtracter 2 outputs the extracted image signal to an amplifier 3. The amplifier 3 amplifies the image signal output from the subtracter 2 and outputs the amplified image signal to the adder 4. The adder 4 adds the image signal, which is output from the amplifier 3, in which a non-edge portion that does not include the edge is amplified and the image signal, which is input from the ε-filter 1, in which only the edge is extracted. The result of the addition is an image signal whose steep edge is maintained and whose non-edge portion is amplified.
According to the ε-filter 1 of the image signal processing apparatus shown in FIG. 1, if the size of an edge in which a pixel level changes steeply is smaller than the predetermined threshold ε1, as shown in FIG. 5, a converted image signal output from the ε-filter 1 is smoothed, as shown in FIG. 6, and does not have a steep edge. Thus, the quality of simple pattern images or the like, in particular, including fine edges is significantly reduced.